package flaud

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CROSSBorderCaseRouter struct{}

// InitCROSSBorderCaseRouter 初始化 跨境案 路由信息
func (s *CROSSBorderCaseRouter) InitCROSSBorderCaseRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	CBCRouter := Router.Group("CBC").Use(middleware.OperationRecord())
	CBCRouterWithoutRecord := Router.Group("CBC")
	CBCRouterWithoutAuth := PublicRouter.Group("CBC")
	{
		CBCRouter.POST("createCROSSBorderCase", CBCApi.CreateCROSSBorderCase)             // 新建跨境案
		CBCRouter.DELETE("deleteCROSSBorderCase", CBCApi.DeleteCROSSBorderCase)           // 删除跨境案
		CBCRouter.DELETE("deleteCROSSBorderCaseByIds", CBCApi.DeleteCROSSBorderCaseByIds) // 批量删除跨境案
		CBCRouter.PUT("updateCROSSBorderCase", CBCApi.UpdateCROSSBorderCase)              // 更新跨境案
	}
	{
		CBCRouterWithoutRecord.GET("findCROSSBorderCase", CBCApi.FindCROSSBorderCase)       // 根据ID获取跨境案
		CBCRouterWithoutRecord.GET("getCROSSBorderCaseList", CBCApi.GetCROSSBorderCaseList) // 获取跨境案列表
	}
	{
		CBCRouterWithoutAuth.GET("getCROSSBorderCasePublic", CBCApi.GetCROSSBorderCasePublic) // 跨境案开放接口
	}
}
